<div  id="more_information" style="display:none">
  <div  class="wrapper">
    <div class="widget_label"><%= "Companies related to your complaint" %></div>
    <div style="margin-bottom:5px;position:relative;">
      <%= text_field_with_auto_complete :company, :title, {:autocomplete => "off"} ,{ :skip_style=>true,:after_update_element=>"getSelectionId"} %>
        <span class="task" style="font-size:12px;"><%= link_to_function "Add", "addCompany()" %> </span>
        <span class="task" style="position:absolute;top:3px;right:3px;font-size:12px;"><%= link_to_function "Add New", "$('new_company').toggle()" %> </span>
    </div>
    <!--
    <div id="new_company" style="display:none;">
      <div  class="wrapper" style="margin:0px";>
        <div class="widget_label"><%= "Add a new Company" %></div>
      </div>
    </div>
    -->
    <div id="companies" class="widget" style="border:1px solid #ced6dc;padding:5px;background:#d4e2ec">
      <% unless @complaint.companies.empty? or  !edit_mode %>
        <% @complaint.companies.each do |company| %>
          <div class='company' style='position:relative;'>
            <%= company.title %>
            <span class='task'>
              <a href='#' onclick="$(this).up('.company').remove(); return false;" style='position:absolute;top:0px;right:3px;'>remove</a>
            </span>
            <input type='hidden' name='complaint[all_companies][]' value=<%= company.id %>/> 
          </div>
        <% end %>
      <% end %>
    </div>
  </div>

  <div  class="wrapper">
    <div class="widget_label"><%= "Add tags relevant to your complaint" %></div>
    <div style="margin-bottom:5px;position:relative;">
      <%= text_field_with_auto_complete :tag, :title, {:autocomplete => "off"} ,{ :skip_style=>true,:after_update_element=>"getTagSelectionId"} %>
        <span class="task" style="font-size:12px;"><%= link_to_function "Add", "addTag()" %> </span>
    </div>
    <div id="tags" class="widget" style="border:1px solid #ced6dc;padding:5px;background:#d4e2ec">
        <% unless @complaint.tags.empty? or  !edit_mode %>
          <% @complaint.tags.each do |tag| %>
            <div class='tag' style='position:relative;'>
              <%= tag.title %>
              <span class='task'>
                <a href='#' onclick="$(this).up('.tag').remove(); return false;" style='position:absolute;top:0px;right:3px;'>remove</a>
              </span>
              <input type='hidden' name='complaint[all_tags][]' value=<%= tag.id %>/> 
            </div>
          <% end %>
        <% end %>
    </div>
  </div>
</div>
